﻿using System;
using System.Collections.Generic;
using System.Linq;

using Recon.Portal.DataObjects;
using Recon.Portal.Data;

namespace Recon.Portal.Business
{
    public class ReconcileEntity
    {
        #region: Public Constructor
        public ReconcileEntity()
        {

        }
        #endregion

        #region: Public Methods
        public int GetUnmatchedInvoiceCount(string CustomerID, int minDays, int maxDays)
        {
            DBFactory db = new DBFactory();
            return db.GetUnmatchedInvoiceCount(CustomerID, minDays, maxDays);
        }

        public int GetUnmatchedInvoiceCountForRemitter(string CustomerID, string UserID, int minDays, int maxDays)
        {
            DBFactory db=new DBFactory();
            return db.GetUnmatchedInvoiceCountForRemitter(CustomerID, UserID, minDays, maxDays);
        }

        public int GetUnauthorizedInvoiceCount(string CustomerID, int minDays, int maxDays)
        {
            DBFactory db=new DBFactory();
            return db.GetUnauthorizedInvoiceCount(CustomerID, minDays, maxDays);
        }

        public List<Invoice> GetUnmatchedInvoices(string CustomerID, string RemitterId, int minDays, int maxDays)
        {
            DBFactory db=new DBFactory();
            return db.GetUnmatchedInvoices(CustomerID, RemitterId, minDays, maxDays);
        }

        public List<Invoice> GetUnmatchedInvoicesForRemitter(string CustomerID, string UserID)
        {
            DBFactory db=new DBFactory();
            return db.GetUnmatchedInvoicesForRemitter(CustomerID, UserID);
        }

        public List<Statement> GetUnmatchedStatements(string CustomerID)
        {
            DBFactory db=new DBFactory();
            return db.GetUnmatchedStatements(CustomerID);
        }

        public List<MatchedInvoice> GetUnauthorizedInvoices(string CustomerID)
{
            DBFactory db=new DBFactory();
            return db.GetUnauthorizedInvoices(CustomerID);
}

       public List<Statement> GetStatementDetailsForRemitter(string CustomerID, string PaymentReferenceNumber)
        {
            DBFactory db=new DBFactory();
            return db.GetStatementDetailsForRemitter(CustomerID, PaymentReferenceNumber);
}

        public void MatchInvoices(List<MatchedInvoice> matchList, string matchType, string custID, string userID)
        {
            DBFactory db=new DBFactory();
            db.MatchInvoices(matchList, matchType, custID, userID);
}

        public void MatchInvoicesForRemitter(List<MatchedInvoice> matchList, string custID, string userID)
        {
            DBFactory db=new DBFactory();
            db.MatchInvoicesForRemitter(matchList, custID, userID);
}

        public void SendInvoicesToRemitter(List<Invoice> invoiceList)
        {
            DBFactory db=new DBFactory();
            db.SendInvoicesToRemitter(invoiceList);
}
        public void AuthorizeInvoices(List<MatchedInvoice> matchList, string custID, string userID)
        {
            DBFactory db=new DBFactory();
            db.AuthorizeInvoices(matchList, custID, userID);
}

        public void RejectInvoices(List<MatchedInvoice> matchList, string custID, string userID)
        {
            DBFactory db=new DBFactory();
            db.RejectInvoices(matchList, custID, userID);
}
        #endregion
    }
}